<script language="javascript" type="text/javascript">
{literal}
function submitbutton(pressbutton) {
	var form = document.adminForm;
  	if (pressbutton == "cancel") {
  		submitform( pressbutton );
  		return;
	}
	// do field validation
	submitform( pressbutton );
}
{/literal}
</script>

{php}$details = $this->get_template_vars('details'); $hcount = count($details); $this->assign('hcount', $hcount);{/php}

<form name="adminForm" action="index.php?option={$option}" method="POST">
<input type="hidden" name="task" value=""/>
<input type="hidden" name="boxchecked" value="" />
<div>
<table class="adminlist">
<thead>
<tr>
<th width="20" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll({$hcount});"/></th>
<th class='title'>Name</th>
<th class='title'>Alias</th>
<th class='title'>Description</th>
</tr>
</thead>

{foreach name=hoteldetails from=$details item=detail}
<tr class="row{cycle values="0,1"}">
  <td><input type="checkbox" id="cb{$smarty.foreach.hoteldetails.index}" name="cid[]" value="{$detail->getHotel_ID()}" onclick="isChecked(this.checked);" /></td>
  <td>{$detail->getname()}</td>
  <td>{$detail->getalias()}</td>
  <td>{$detail->getdescription()}</td>
</tr>
{/foreach}

<tfoot>
</tfoot>

</table>
</div>
</form>